import React, { Suspense, lazy } from "react";
import { BrowserRouter as Router, Route } from "react-router-dom";
import { ConfigProvider } from "antd";
import zhCN from 'antd/lib/locale/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
const Index = lazy(() => import("./index/index"));
const UserSpace = lazy(() => import("./userspace/index"));
moment.locale('zh-cn');

function PageRouter() {
    return (
        <ConfigProvider locale={zhCN}>
            <Router>
                <Suspense fallback={""}>
                    <Route path="/" exact component={Index}></Route>
                    <Route path="/userspace" component={UserSpace}></Route>
                </Suspense>
            </Router>
        </ConfigProvider>
    )
}



export default PageRouter;